var modZMultiple_locLang=new localLang("modZMultiple");
var modZMultiple = new Class({
	Extends:WFWindow,
	sampleProxyEnable: false,	
    options: {
        name: 'modZMultiple',
        title: modZMultiple_locLang.label('title'),
        btnSettings: false,
        btnRefresh: false,
        btnHelp: false,
        btnClose: true,
        loadCSS: false,
		supportServerTypes:['modSimple']
    },
    renderContent: function(){
        for (var list=g_serverlist.getServerList(),arr=[],i=0,j=list.length;i<j;++i){
            arr.push(list[i].id);
        }
        arr.join(',');
        this.boxBD.innerHTML = '<p>server list ids:' + arr + '</p><input id="inputserverids" type="text" /><input id="submitids" type="button" value="submit" /><div id="' + this.options.name + 'response"></div>';
        var inputIds = $('inputserverids');
        $('submitids').addEvent('click',function(e){
            var data = 'module=modZMultiple&serverid=' + inputIds.value;
            this.proxyRequest(data,this.displaySuccess.bind(this),this.displayFailure.bind(this));
        }.bind(this));
        window.fireEvent('widget_load', this.widgetInfo);
    },
    displaySuccess: function(response)
	{
        $(this.options.name + 'response').innerHTML = response;
        //fire when widget loaded or change height
        window.fireEvent('widget_load', this.widgetInfo);
    },
    displayFailure: function(){
    }
});
